package com.zufe.khw;

import java.time.LocalDate;
import java.util.Calendar;

public class Test5 {
    public static void main(String[] args) {
        LocalDate date = LocalDate.of(2001, 3, 1);
        System.out.println(date.isLeapYear());
    }

    private static void extracted1() {
        LocalDate date = LocalDate.of(2000, 3, 1);
        LocalDate date1 = date.minusDays(1);
        System.out.println(date1.getDayOfMonth());
    }

    private static void extracted1(int year, int january, int dayOfYear) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(year, january, 1);
        calendar.add(Calendar.DAY_OF_MONTH, -1);
        int day = calendar.get(dayOfYear);
        System.out.println(day);
    }

    private static void extracted() {
        extracted1(2000, Calendar.MARCH, Calendar.DAY_OF_MONTH);
    }
}
